#include <assert.h>
#include "helloworlddao_factory.h"
#include "helloworlddao_stub4web.h"
#include "helloworlddao_stub4app.h"
//#include "helloworlddao.h"

using namespace erp::helloworld::dao;

bool CHelloWorldDaoFactory::s_HelloWorldDaoInit = false;

IHelloWorldDao* CHelloWorldDaoFactory::GetObject(enum ObjType_T obj_type)
{
    switch(obj_type)
    {
    case STUB4APP:
        return (new CHelloWorldDaoStub4App);
/*适应container3
    case POCO:
    {
        if(!s_HelloWorldDaoInit)
        {
            int iRetCode = CHelloWorldDao::Initialize();
            assert(iRetCode == 0);
            s_HelloWorldDaoInit = true;
        }   	
        return (new CHelloWorldDao);
	}*/
    default:
        assert(0);
    };
    return NULL;
}

IHelloWorldDaoAsyc* CHelloWorldDaoFactory::GetAsycObject()
{
	return (new CHelloWorldDaoStub4App);
}
